package com.xiaochong.tir.api.component.actor;

import akka.actor.UntypedActor;
import com.xc.logclient.utils.LogTrace;
import com.xiaochong.tir.api.service.CurrencyDiagnosisService;
import com.xiaochong.tir.api.service.TokenIndexRankService;
import com.xiaochong.tir.api.util.SpringContextUtil;

/**
 * Created by org on 2018/5/12.
 * 量化评估-市场热度、量能变化、货币流动
 */
public class AkkaCurrencyDiagnosisAssessmentFive extends UntypedActor {

    /**
     *量化评估-市场热度、量能变化、货币流动
     */
    private CurrencyDiagnosisService currencyDiagnosisService =
            (CurrencyDiagnosisService) SpringContextUtil.getBean("currencyDiagnosisService");
    @Override
    public void onReceive(Object o) throws Exception {
        LogTrace.beginTrace("量化评估-市场热度、量能变化、货币流动");
        Long start = System.currentTimeMillis();
        currencyDiagnosisService.MarketHeatListToCache();
        LogTrace.info("Akka量化评估-市场热度、量能变化、货币流动5分钟存入redis","耗时",String.valueOf(System.currentTimeMillis()-start));
    }
}
